#include "model/clases/Interfaz.h"
Interfaz::Interfaz(const std::string& nombre) {
	this->nombre = nombre;
}

void Interfaz::addMetodo(Metodo* met){

}

std::vector<Metodo*>& Interfaz::getMetodos() {
	return this->m_metodos;
}

void Interfaz::serialize(XmlWriter & writer_rep, XmlWriter & writer_comp){

	writer_rep.addRootChild(NODE_INTERFACE, "");
	ComponentClasses::serialize(writer_rep, writer_comp);

	/* TODO parametrizar las etiquetas */

	/* Serializo mis parametros */
	writer_comp.addRootChild(NODE_INTERFACE, "");
	ComponentClasses::saveMyComp(writer_comp);
	xmlNode* nodoInterfaz = writer_comp.getCurrentNode();
	writer_comp.addProperty(nodoInterfaz, TARGET_NAME, nombre.c_str());
	writer_comp.addProperty(nodoInterfaz, "intfName", this->nombre.c_str());

	for (std::vector<Metodo*>::iterator it = m_metodos.begin();
			it != m_metodos.end(); it++) {
		(*it)->serialize(writer_rep, writer_comp);
	}
}

void Interfaz::deserialize(XmlReader & reader){

}

Interfaz::~Interfaz(){

}
